home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.0 / stk-3 / blt-for-STk-3.0 / blt-1.9 / demos / graph3 < prev    next >
Encoding:
Text File  |  1995-07-01  |  728 b   |  32 lines

  1. #!../blt_wish -f
  2.  
  3. set graph .g
  4.  
  5. blt_graph $graph
  6. $graph xaxis configure -title "Years"
  7. $graph yaxis configure -title "Random values"
  8. $graph y2axis configure -mapped true -title "Random values"
  9.  
  10. set x { 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 }
  11. set y { 
  12.     0.693147 0.405465 0.287682 0.223144 0.182322 0.154151 
  13.     0.133531 0.117783 0.105361 0.0953102 0.0870114 
  14. }
  15.  
  16. set y2 { 
  17. 19.8669 38.9418 56.4642 71.7356 84.1471 93.2039
  18. 98.545 99.9574 97.3848 90.9297 80.8496
  19. }
  20.  
  21. $graph element create line1 -symbol circle -bg red -linewidth 1 \
  22.     -x $x -y $y 
  23. $graph element create line2 -symbol square -bg yellow -linewidth 1 \
  24.     -x $x -y $y2 -mapy y2
  25.  
  26. pack .g
  27.  
  28. source features.tcl
  29. SetZoom .g
  30. SetActiveLegend .g
  31. SetClosestPoint .g
  32.